package com.suxiaoxiao.springbootlearn.designpattern.commandpattern;

import com.suxiaoxiao.springbootlearn.designpattern.commandpattern.commands.Command;

/**
 * 插槽
 * @author 、
 */
public class SimpleRemoteControl {

    Command slot;

    public SimpleRemoteControl() {
    }

    public void setCommand(Command command) {
        slot = command;
    }

    public void buttonWasPressed() {
        slot.execute();
    }

}
